package com.southsmart.sgeocserver.config;


import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
* 启动时加载
* @author cjunxian
* @date 2021/8/2
*/
@Component
public class DatasourceConfig implements ApplicationRunner {

    @Resource(name = JdbcDatasource.BEAN_NAME)
    JdbcDatasource jdbcDatasource;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        jdbcDatasource.initDatasource();
    }
}
